package com.gxstnu.mapper;

import com.gxstnu.entity.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserMapper {
    List<User> selectAll(User user);

    void insert(User user);

    @Select("select * from `user` where name = #{name}")
    User selectByName(String name);

    void updateById(User user);

    @Delete("delete from user where id = #{id}")
    void deleteById(Integer id);
}
